//
//  TTXMLWebService.m
//  Tint
//
//  Created by Kevin Wu on 2/29/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import "TTXMLWebService.h"

@implementation TTXMLWebService



#pragma mark - Override

- (id)objectToBeParsed:(NSData *)data {
    if (TTIsDataWithBytes(data)) {
        
        TTXML *xml = [TTXML XMLWithXMLData:data];
        
        if ([xml rootElement]) {
            return xml;
        } else {
            return [NSError errorWithDomain:TTTintErrorDomain description:@"XML data invalid"];
        }
        
    }
    return nil;
}

@end
